<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title>我的认证</title>
    <script src="js/rem.js"></script>
    <link rel="stylesheet" href="css/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.min.css">
    <link rel="stylesheet" href="css/public.css">
    <link rel="stylesheet" href="css/user.css">
    <script>(function() {var _53code = document.createElement("script");_53code.src = "https://tb.53kf.com/code/code/96d8f960b261e49515450f8953b044bc5/1";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(_53code, s);})();</script>
</head>
<body>
    <div class="pub-container user-auth-result hide" id="pageWrapper">
        <div class="main">
            <ol class="top">
                <li class="pass">已通过认证</li>
                <li class="reject">已驳回</li>
                <li class="review">审核中</li>
            </ol>
            <div class="auth-info">
                <h3>认证信息</h3>
                <a href="user-auth-index.html?type=reAuth" class="pub-bth">重新认证</a>
                <ul class="auth-info-list" id="authList">
                    <li>
                </ul>
            </div>
        </div>
    </div>
    <script src="js/jquery-3.6.0.min.js"></script>
    <script src="js/jquery-weui.min.js"></script>
    <script src="js/md5.js"></script>
    <script src="js/public.js"></script>
    <script>
        $.showLoading();
        // 查询我的认证
        function queryMes(){
            http('/userMessage/getMyMessage', {
                hasToken: true,
                success: function(res){
                    if(res.code === '01'){
                        var data = res.data;
                        var auditStatus = data.auditStatus || 1;
                        if(data.roleId == 5){
                            auditStatus = 2;
                        }
                        var asClass = {
                            1: '.review',
                            2: '.pass',
                            3: '.reject'
                        };
                        $('.top').find(asClass[auditStatus]).addClass('active').siblings().removeClass('active');
                        var html = ''
                        if(data.nickName){
                            html += '<li>' + 
                                '<span class="last-text-justify">账号昵称</span>' + 
                                '<span>' + data.nickName + '</span>' + 
                            '</li>';
                        }
                        html += '<li>' + 
                            '<span class="last-text-justify">真实姓名</span>' + 
                            '<span>' + data.userName + '</span>' + 
                        '</li>' + 
                        '<li>' + 
                            '<span class="last-text-justify">手机号码</span>' + 
                            '<span>' + phoneDesensitization(data.loginMobile) + '</span>' + 
                        '</li>'
                        if(data.roleId == '4'){
                            html += '<li>' + 
                                '<span class="last-text-justify">职务</span>' + 
                                '<span>' + data.duty + '</span>' + 
                            '</li>' + 
                            '<li>' + 
                                '<span class="last-text-justify">职称</span>' + 
                                '<span>' + data.competent + '</span>' + 
                            '</li>' + 
                            '<li>' + 
                                '<span class="last-text-justify">医院</span>' + 
                                '<span>' + data.hospitalCode + '</span>' + 
                            '</li>';
                        }else if(data.roleId == '9'){
                            html += '<li>' + 
                                '<span class="last-text-justify">学校</span>' + 
                                '<span>' + data.school + '</span>' + 
                            '</li>' + 
                            '<li>' + 
                                '<span class="last-text-justify">专业</span>' + 
                                '<span>' + data.special + '</span>' + 
                            '</li>';
                        } else if(data.roleId == '6'){
                            // html += '<li>' + 
                            //     '<span class="last-text-justify">机构名称</span>' + 
                            //     '<span>' + data.duty + '</span>' + 
                            // '</li>';
                        }
                        html += '<li>' + 
                        '<span class="last-text-justify">认证身份</span>' + 
                            '<span>' + data.roleName + '</span>' + 
                        '</li>';
                        $('#authList').html(html);
                        $('#pageWrapper').show();
                    }else if(res.code === '04') {
                        setTimeout(function(){
                            window.location.replace('user-auth-index.html');
                        }, 1000)
                    }
                    $.hideLoading();
                },
                fail: function(){
                    $.hideLoading();
                }
            
            })
        }
        queryMes();
    </script>
</body>
</html>